<?php
/**
 * @author Vuong Minh Chau <mchau2083@yahoo.com>
 */
require_once APPPATH."controllers/cms_template.php";
class cms_text_template extends cms_template{
	function __construct(){
    	parent::__construct();
    	$this->_template_type = 'text';
  	}

	function add($level = 1, $nav_id = 0){
		if ($this->input->post('Submit')) {
			// Serialize t1
			$t1 = parse_input("t1_", $_POST);
			$_POST['item_t1'] = serialize($t1);
		 }
		 else{
		 }
		 return parent::add($level, $nav_id);
  	}

  	function edit($level = 1, $nav_id = 0, $id = 0){
		if ($this->input->post('Submit')) {
			// Serialize t1
			$t1 = parse_input("t1_", $_POST);
			$_POST['item_t1'] = serialize($t1);
		 }
		 else{
		 }
		 parent::edit($level, $nav_id, $id);
  	}

}
?>